Automated Presentation of directory src/exampleCode/swirl/

HUB | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New


Please be aware: what appears below are the v4.2 DT bits in auto-generated html form.
As we have the time, we will update these to reflect the current "state of the world".


README file from "swirl" directory


                                 swirl README
                              

                  a texture generator program for texture maps


               Swirl is a program that repeatedly modifies images 
           in a regular way, and often generates interesting patterns.
    


    See swirl.doc for details of execution.  

    artshow is a demo program that invokes specific interesting textures.
    


    
    I was trying to find some simple algorithms that generate interesting
    patterns that could possibly be used as textures for texture maps, etc. 
    All of the patterns produced wrap from top to bottom, and left to right.
    
    Swirl works as follows:  For each pixel (i, j) I keep 5 values -- the R,
    G, and B components, and two floats, dx(i, j) and dy(i, j).  Typically,
    the floats are small (on the order of -15 to 15).  Generation n+1 is
    calculated from generation n as follows:
    
        At the pixel (i, j), find dx = dx(i, j) and dy = dy(i, j).
    
        Find the color (in generation n) of pixel (i+dx, j+dy).  Since
        dx and dy are, in general, floats, do the appropriate filtering.
        (If you go off the image, just wrap to the opposite side.)
    
        Assign this new color to the pixel (i, j) in generation n+1.
    
    Basically, the dx and dy values form a 2-D vector field that indicate
    the flow direction (actually the negative of that).  If the dx and dy
    are sinusoidal, you'll get swirling.  You can also do shearing,
    electric attractive and repulsive fields, etc.
    
    
    Suggestions welcome; bugs to /dev/null.  The code may change, but I'll
    add features using higher numbers for starting values and dx and dy
    specifications.
                                           -- Tom Davis (davis@sgi.com)

Files of interest from "src/exampleCode/swirl" directory

Source

Documentation

Reference


Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.) a compressed tar image of the above-selected items.
OR, ...
a compressed tar image of the entire swirl directory.

Copyright © 1995, Silicon Graphics, Inc.